/**
 * Copyright (c) 2013-Now http://jeesite.com All rights reserved.
 * No deletion without permission, or be held responsible to law.
 * @author lzw
 */
import { defHttp } from '/@/utils/http/axios';
import { useGlobSetting } from '/@/hooks/setting';
import { BasicModel, Page } from '../model/baseModel';

const { adminPath } = useGlobSetting();

export interface CaseMaterials extends BasicModel<CaseMaterials> {
  materialsClmc?: string; // 材料名称
}

export const caseMaterialsList = (params?: CaseMaterials | any) =>
  defHttp.get<CaseMaterials>({ url: adminPath + '/operating/caseMaterials/list', params });

export const caseMaterialsListData = (params?: CaseMaterials | any) =>
  defHttp.post<Page<CaseMaterials>>({ url: adminPath + '/operating/caseMaterials/listData', params });

export const caseMaterialsForm = (params?: CaseMaterials | any) =>
  defHttp.get<CaseMaterials>({ url: adminPath + '/operating/caseMaterials/form', params });

export const caseMaterialsSave = (params?: any, data?: CaseMaterials | any) =>
  defHttp.postJson<CaseMaterials>({ url: adminPath + '/operating/caseMaterials/save', params, data });

export const caseMaterialsDelete = (params?: CaseMaterials | any) =>
  defHttp.get<CaseMaterials>({ url: adminPath + '/operating/caseMaterials/delete', params });
